package cn.iocoder.yudao.module.system.controller.admin.gugu.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 智能推荐专业响应 VO
 *
 * @author 芋道源码
 */
@Schema(description = "管理后台 - 智能推荐专业响应 VO")
@Data
public class MajorRecommendRespVO {

    @Schema(description = "总记录数", example = "120")
    private Long total;

    @Schema(description = "推荐专业列表")
    private List<MajorRecommendItemVO> list;

    @Schema(description = "当前页码", example = "1")
    private Integer pageNum;

    @Schema(description = "每页大小", example = "10")
    private Integer pageSize;

    @Schema(description = "当前页记录数", example = "10")
    private Integer size;

    @Schema(description = "起始行", example = "1")
    private Integer startRow;

    @Schema(description = "结束行", example = "10")
    private Integer endRow;

    @Schema(description = "总页数", example = "12")
    private Integer pages;

    @Schema(description = "上一页", example = "0")
    private Integer prePage;

    @Schema(description = "下一页", example = "2")
    private Integer nextPage;

    @Schema(description = "是否为首页", example = "true")
    private Boolean isFirstPage;

    @Schema(description = "是否为尾页", example = "false")
    private Boolean isLastPage;

    @Schema(description = "是否有上一页", example = "false")
    private Boolean hasPreviousPage;

    @Schema(description = "是否有下一页", example = "true")
    private Boolean hasNextPage;

    @Schema(description = "导航页码数", example = "8")
    private Integer navigatePages;

    @Schema(description = "所有导航页码")
    private int[] navigatepageNums;

    @Schema(description = "导航条上的第一页", example = "1")
    private Integer navigateFirstPage;

    @Schema(description = "导航条上的最后一页", example = "8")
    private Integer navigateLastPage;

    @Schema(description = "汇总信息")
    private SummaryVO summary;

    @Schema(description = "统计信息")
    private StatisticsVO statistics;

    /**
     * 汇总信息
     */
    @Schema(description = "汇总信息")
    @Data
    public static class SummaryVO {

        @Schema(description = "用户分数", example = "580")
        private Integer userScore;

        @Schema(description = "用户位次", example = "15000")
        private Integer userRank;

        @Schema(description = "省份", example = "江苏")
        private String province;

        @Schema(description = "考试类型", example = "物理类")
        private String examType;

        @Schema(description = "选科组合", example = "物理+化学+生物")
        private String subjectCombination;

        @Schema(description = "冲刺专业数量", example = "30")
        private Integer chongCount;

        @Schema(description = "稳妥专业数量", example = "50")
        private Integer wentuoCount;

        @Schema(description = "保底专业数量", example = "40")
        private Integer baodiCount;

        @Schema(description = "分析文本", example = "基于您的分数580分，位次15000名，为您推荐120个专业")
        private String analysisText;
    }

    /**
     * 统计信息
     */
    @Schema(description = "统计信息")
    @Data
    public static class StatisticsVO {

        @Schema(description = "学科门类分布")
        private List<CategoryStatVO> categoryStats;

        @Schema(description = "地域分布")
        private List<RegionStatVO> regionStats;

        @Schema(description = "学校类型分布")
        private List<SchoolTypeStatVO> schoolTypeStats;

        @Schema(description = "概率分布")
        private List<ProbabilityStatVO> probabilityStats;

        /**
         * 学科门类统计
         */
        @Schema(description = "学科门类统计")
        @Data
        public static class CategoryStatVO {
            @Schema(description = "学科门类", example = "工学")
            private String category;

            @Schema(description = "专业数量", example = "45")
            private Integer count;

            @Schema(description = "占比", example = "37.5")
            private Double percentage;
        }

        /**
         * 地域统计
         */
        @Schema(description = "地域统计")
        @Data
        public static class RegionStatVO {
            @Schema(description = "地域", example = "江苏")
            private String region;

            @Schema(description = "专业数量", example = "30")
            private Integer count;

            @Schema(description = "占比", example = "25.0")
            private Double percentage;
        }

        /**
         * 学校类型统计
         */
        @Schema(description = "学校类型统计")
        @Data
        public static class SchoolTypeStatVO {
            @Schema(description = "学校类型", example = "985")
            private String schoolType;

            @Schema(description = "专业数量", example = "20")
            private Integer count;

            @Schema(description = "占比", example = "16.7")
            private Double percentage;
        }

        /**
         * 概率统计
         */
        @Schema(description = "概率统计")
        @Data
        public static class ProbabilityStatVO {
            @Schema(description = "概率范围", example = "80-100%")
            private String probabilityRange;

            @Schema(description = "专业数量", example = "25")
            private Integer count;

            @Schema(description = "占比", example = "20.8")
            private Double percentage;
        }
    }
}
